// Copyright (c) 2005  INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of cgal-python; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; version 2.1 of the License.
// See the file LICENSE.LGPL distributed with cgal-python.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $Id: Py_Bbox_2.cpp 165 2007-11-02 14:35:12Z spion $
// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal-python/trunk/cgal-python/bindings/Kernel/Py_Bbox_2.cpp $
//
// Author(s)     : Naceur Meskini
//=========================================================================

#include <CGAL/basic.h>
#include <CGAL/Bbox_2.h>

#include <boost/python.hpp>
#include <boost/cstdint.hpp>

template<class Bbox_2>
boost::python::str py_repr_Bbox_2(const Bbox_2& b )
{
	using namespace boost::python;
	return str("Bbox_2( xmin = " + str(b.xmin()) +",ymin = " + str(b.ymin()) +",xmax = " + str(b.xmax())+",ymax = " + str(b.ymax()) +")" );
}

void export_Bbox_2()
{
	using namespace boost::python;

	typedef CGAL::Bbox_2 	Bbox_2;
   
	class_< Bbox_2 >("Bbox_2", init<  >())
        .def(init< const Bbox_2& >())
        .def(init< double, double, double, double >())
        .def("dimension", &Bbox_2::dimension)
        .def("xmin", &Bbox_2::xmin)
        .def("ymin", &Bbox_2::ymin)
        .def("xmax", &Bbox_2::xmax)
        .def("ymax", &Bbox_2::ymax)
        .def("max", &Bbox_2::max)
        .def("min", &Bbox_2::min)
        .def("__repr__", &py_repr_Bbox_2<Bbox_2>)
        .def( self == self )
        .def( self != self )
        .def( self + self )
    ;
}
